import React, { Component } from 'react'
import MyContext from '@/mycontext'
import GrandSon from './GrandSon'
export default class Child extends Component {
    render() {
        return (
            <MyContext.Consumer>
                {
                    arg=>{
                        return <div style={{
                            display:'flex',
                            justifyContent:'center',
                            alignItems:'center',
                            width:'200px',
                            height:'200px',
                            backgroundColor:'orange'
                          }}>
                            {arg.msg}
                            <GrandSon></GrandSon>
                          </div>
                    }
                }

            </MyContext.Consumer>
        )
      }
}
